package com.youhome.common.exception;

import com.youhome.common.response.ResultCode;

/**
 * Created by chen365 on 2019/01/23.
 */
public class CustomException extends Exception {
    private ResultCode resultCode;
    private Object object;

    public CustomException(ResultCode resultCode, Object object) {
        super(resultCode.getMsg());
        this.resultCode = resultCode;
        this.object = object;
    }

    public CustomException(ResultCode resultCode) {
        super(resultCode.getMsg());
        this.resultCode = resultCode;
    }

    public Object getObject() {
        return object;
    }

    public ResultCode getResultCode() {
        return resultCode;
    }
}
